<!--HEADER-->
{include file="Public/header"/}
<style>
    .payCzyh p{color: #333; border-color:#333;}
    .payCzyh p.active, .payCzyh p:hover { border: 1px solid #d9534f; color: #d9534f;    }
</style>
<!--HEADER-->
<div class="clearfix clearfix20"></div>
<div class="container">
    <div class="row">
		 {include file="Public/readme"/}
        <div class="col-sm-9">
            <div class="panel panel-default">
                <!--<h3 class="personal-con-tit">线下充值</h3>-->
                <div class="panel-heading">
                    <h3 class="panel-title">线下充值</h3>
                </div>
                <div class="panel-body">

                    <div id="myTabsZjglConten" class="tab-content">
                        <!--会员充值-->
                        <div role="tabpanel" class="tab-pane fade in active" id="tChzh">
                            <div class="col-sm-9 col-md-10 payCzjk">
                                <table class="table table-responsive">
                                    <tbody><tr>
                                        <th class="text-right ft14" style="width: 120px;">充值方式：</th>
                                        <td>
                                            <label class="payType ft14">
                                                <a href="/home/Ofrecharge/ofrecharge" class="btn btn-primary active cursorD" >线下充值</a>
                                            </label>
                                            <label class="payType ft14">
                                        	 <a href="/home/Recharge/recharge" class="btn btn-default cursorD" >在线充值</a>
                                            </label>
                                        </td>
                                    </tr>
                                    </tbody>
                             <form class="form-horizontal" role="form" action="/home/Ofrecharge/ofadd" method="post" enctype="multipart/form-data">
                                  <tbody class="payLine">
                                    <tr>
                                        <th class="text-right ft14">充值金额：</th>
                                        <td>
                                            <div class="col-md-5 input-group">
                                               <input type="number" class="form-control" id="amount" name="amount" value=""
                                           placeholder="充值金额" step="0.01"  onkeypress="return checkNumber(event,this);" required="required">
                                                <div class="input-group-addon">元</div>
                                            </div>
                                            <!--<p class="help-block pull-left"> (充值费率：0%，此费用由“第三方支付”收取)</p>-->
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="text-right ft14">充值费用：</th>
                                        <td>0.00元</td>
                                    </tr>
                                    <tr>
                                        <th class="text-right ft14">实付金额：</th>
                                        <td id="sf">0.00元</td>
                                    </tr>
                                    <tr>
                                        <th class="text-right ft14">上传凭证：</th>
                                        <td>
                                            <div class="form-group">
                                                <label for="" class="sr-only"></label>
                                                 <input type="file"  name="image" required="required">

                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="text-right ft14">银行流水号：</th>
                                        <td>
                                            <div class="input-group col-md-5">
                                                <input type="text" class="form-control" id="" placeholder="银行流水号" name="number" value="">
                                            </div>
                                        </td>
                                    </tr>
                                    <input type="hidden" name="min" value="{$min}">
                                    <input type="hidden" name="type" id="accountNumberid" value="" required="required">
                                    <!--<tr>-->
                                        <!--<th colspan="2" class="text-left ft14" style="color: crimson; font-size:13.5px">-->
                                            <!--提示：当日17点后线下汇款单笔超过5万无法实时到账，请17点后汇款单笔不要超过5万，22点后的线下汇款第二天方能到账。-->
                                        <!--</th>-->
                                    <!--</tr>-->
                                    <tr>
                                        <th class="text-right ft14">充值银行：</th>
                                               <td>
							                        <div class="payCzyh">
							                            {foreach name='list' item='v' }
							                            <p>
							                                <input type="hidden" name="rebank" value="{$v.id}" required="required">
							                                {if condition="$v['personal']==0"}
                                                            公司收款账户
							                                 {/if}
							                                {if condition="$v['personal']==1"}
                                                            法人/股东账户
							                                {/if}
							
							                                {$v.payee} 收款帐号:{$v.accountnumber} 开户行：{$v.openingbank}</p>
							                            {/foreach}
							                        </div>
                                                         </td>
                                    </tr>
                                    </tbody>
                                   <tbody><tr>
                                        <th></th>
                                        <td>
                                            <button class="btn btn-danger">&nbsp;&nbsp;&nbsp;充值&nbsp;&nbsp;&nbsp;
                                            </button>
                                        </td>
                                    </tr>

                                    </tbody></table>
                            </div>

                            <!--<div class="col-sm-9 col-md-10">-->
                                <!--<ul>-->
                                    <!--<li>即时充值所产生的转账费用，由第三方平台收取，充值费用视平台而定。</li>-->
                                    <!--<li>请注意您的银行卡充值限制，以免造成不便。</li>-->
                                    <!--<li>如果充值金额没有及时到账，请和客服联系。</li>-->
                                <!--</ul>-->
                            <!--</div>-->
                        </div>
                    </div>
                </form>



                </div>
            </div>

        </div>
    </div>
</div>
    

</head>
<body>


<!--footer-->
{include file="Public/footer"/}
<!--footer-->

<script>
//alert(1);
    $("#collapseOne").find(".list-group").find("li").eq(1).addClass("active");

    //线下充值
    $(".payCzyh").find("p").each(function (index) {
        $(this).click(function () {
            $(this).addClass("active").siblings("p").removeClass("active");
            var idaaa = $(this).find("input").attr("value");
            $("#accountNumberid").val(idaaa);
        });
    });


$("#amount").blur(function(){
    $(".sfje").html($("#amount").val());
});

/*function test($this) {
    var amount = $("input[name='amount']").val();
    var min = $("input[name='min']").val();
    //最小金额
    if(amount <min){
        alert('最低金额不小于'+min+'元');
        return false;
    }

    $("#sf").html(sf.toFixed(2));


}*/



    //确定订单
    $("#btnRecharge").click(function(){
        if(window.confirm('是否已转账？')){
            //alert("确定");
            return true;
        }else{
            //alert("取消");
            return false;
        }
    });


</script>
<script>
    function checkNumber(e, txt) {
        var key = window.event ? e.keyCode : e.which;
        var keychar = String.fromCharCode(key);
        reg = /\d|\./;
        var result = reg.test(keychar);
        if (result) {
            if (e.keyCode == 46)
                result = !(txt.value.split('.').length > 1);
            else
                result = !(txt.value.split('.').length > 1 && txt.value.split('.')[1].length > 1);
        }
        if (!result) {
            return false;
        }
        else {
            return true;
        }
    }
</script>